home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 September / PCWorld_2008-09_cd.bin / v cisle / sadanastroju / wot-20080519-fx.xpi / chrome / wot.jar / content / eula.js < prev    next >
Text File  |  2007-11-11  |  734b  |  39 lines

  1. /*
  2.     eula.js
  3.  
  4.     Copyright ┬⌐ 2006, 2007  Against Intuition, Inc. <info@mywot.com>
  5. */
  6.  
  7. var wot_eula =
  8. {
  9.     accept: function()
  10.     {
  11.         try {
  12.             return (wot_prefs.setBool("eula_accepted", true) &&
  13.                     wot_prefs.setBool("enabled", true));
  14.         } catch (e) {
  15.             dump("wot_eula.accept: failed with " + e + "\n");
  16.         }
  17.         return false;
  18.     },
  19.  
  20.     decline: function()
  21.     {
  22.         try {
  23.             wot_prefs.setBool("eula_accepted", false);
  24.             wot_prefs.setBool("enabled", false);
  25.  
  26.             var em = Components.classes["@mozilla.org/extensions/manager;1"].
  27.                         getService(Components.interfaces.nsIExtensionManager);
  28.  
  29.             if (em) {
  30.                 em.uninstallItem(WOT_GUID);
  31.             }
  32.             return true;
  33.         } catch (e) {
  34.             dump("wot_eula.decline: failed with " + e + "\n");
  35.         }
  36.         return false;
  37.     }
  38. }
  39.